<?php
class Backoffice_Model_FormFlag extends CC_Backoffice_Form
{
    /** @var Doctrine\ORM\EntityManager */
    protected $_em;
    
    public function __construct($options = null, Doctrine\ORM\EntityManager $em = null)
    {
        parent::__construct($options);
        $this->_em = $em;
        
        $this->setMethod('post');
        
        $name = new Zend_Form_Element_Text('name');
        $name->setAttrib('size', 28)
             ->setLabel("Name")
             ->setRequired(true)
             ->addErrorMessage("A name is required");
        
        $description = new Zend_Form_Element_Text('description');
        $description->setAttrib('size', 28)
                    ->setLabel('Description')
                    ->setRequired(true)
                    ->addErrorMessage("A description is required");
        
        $zones = new Zend_Form_Element_MultiCheckbox('zones');
        $zones->setOptions(
            array(
                'label'      => 'Active in',
                'multiOptions' => array(
                    "dev" => "Development",
                    "prod" => "Production",
                ),
            )
        );
                    
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel("Create Flag");

        $this->addElements(array($name, $description, $zones, $submit));
        
    }
}
?>